Skip to content

Conversation

jwalterss
Copy link
Contributor

@jwalterss jwalterss commented Jul 30, 2025

Todos

  • Add new AP style stop words
  • Implement Apple product name handling
  • Update and add tests
  • All tests passing

Deployment

No special deployment requirements. This is a frontend-only change to the AP
title case utility function.

Reference

Documentation here:

Tickets:

Linked PR

Implementation Decisions

  1. Stop Words: Added 'as', 'if', 'off', 'out', 'so', and 'vs' to the stop
    words list to align with AP style guidelines. These words should remain
    lowercase unless they start a title or follow a colon.

  2. Apple Product Names: Added special handling for Apple product names
    (iPhone, iPad, iPod, iMac, iCloud, iTunes, iBooks, iMessage) to ensure the
    'i' remains lowercase when these words appear at the beginning of a title or
    after capitalization triggers.

  3. Test Coverage: Added comprehensive test cases for both the new stop
    words and Apple product name handling to ensure the implementation works
    correctly in various contexts.

- Added new stop words: as, if, off, out, so
- Added support for Apple product names (iPhone, iPad, etc.)
- Updated tests to cover new capitalization rules
@jwalterss jwalterss requested a review from a team as a code owner July 30, 2025 13:56
mmiermans
mmiermans previously approved these changes Aug 6, 2025
Copy link
Contributor

@mmiermans mmiermans left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@jwalterss jwalterss force-pushed the HNT-682-add-new-capitalization-rules branch from f58db84 to 0dcce14 Compare August 28, 2025 14:52
…est coverage

- Refactored implementation for better readability with clear separation of concerns
- Converted stop words to Set for O(1) lookups
- Added comprehensive documentation and comments
- Improved handling of special cases (quotes, colons, Apple products)
- Removed lowercaseAfterApostrophe export as it's now internal
- Updated tests to match new implementation
@jwalterss jwalterss force-pushed the HNT-682-add-new-capitalization-rules branch from 0dcce14 to c592e11 Compare August 28, 2025 14:58
@jwalterss jwalterss requested a review from mmiermans August 28, 2025 15:07
@mmiermans mmiermans changed the title HNT-682-add-new-capitalization-rules HNT-862-add-new-capitalization-rules Aug 29, 2025
@jwalterss jwalterss closed this Oct 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants